perm filename EXAM.FAI[S,AIL] blob sn#000866 filedate 1971-08-24 generic text, type T, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
RECORD PAGE   DESCRIPTION
 00001 00001
 00002 00002		TITLE	EXAM
 00004 ENDMK
⊗;
	TITLE	EXAM
EXAM:	INIT	1,14
	'DSK   '
	INB1
	0
	CALL	1,['GETPPN']
	MOVEM	1,LKUFD
	LOOKUP	1,LKUFD
	0
	INIT	2,14
	'DSK   '
	INB2
	0
	INBUF	1,1
	INBUF	2,1
OLOOP:	CLOSE	2,
	JSP	1,GTUFD
	JSP	1,GTUF2
	JSP	1,GTUF3
	JSP	1,GTUF3
	JUMPE	2,OLOOP
	SETZB	4,5
	LOOKUP	2,2
	0
	HLLZS	3
	INPUT	2,
	ILDB	10,INB2+1
	TRNE	10,1
HERE:	JSP	1,FILOUT	;LINE NUMBER, EX FILE
	CAME	10,[ASCII /COMME/]
	JRST	OLOOP
	ILDB	10,INB2+1
	ILDB	10,INB2+1
	CAME	10,[ASCII /INVAL/]
	CAMN	10,[ASCII /  VAL/]
	JSP	1,FILOUT	;T FILE
	JRST	OLOOP

GTUFD:	JSP	11,GTUF
	MOVE	2,12
	JRST	(1)

GTUF2:	JSP	11,GTUF
	MOVE	3,12
	JRST	(1)

GTUF3:	JSP	11,GTUF
	JRST	(1)

GTUF:	SOSG	INB1+2
	IN	1,
	JRST	OK
	STATZ	1,20000
	CALLI	12
	0
OK:	ILDB	12,INB1+1
	JRST	(11)

INB1:	BLOCK	3
INB2:	BLOCK	3

LKUFD:	'  TAIL'
	'UFD   '
	0
	'  1  1'

FILOUT:	MOVE	12,2
	JSP	11,SIXOUT
	JUMPE	3,OUTCR
	OUTSTR	[ASCII /./]
	MOVE	12,3
	JSP	11,SIXOUT
OUTCR:	TRNE	10,1
	OUTSTR	[ASCIZ / HAS LINE NUMBERS/]
	TRNN	10,1
	OUTSTR	[ASCIZ / HAS A `T' DIRECTORY/]
	OUTSTR	[ASCII /
/]
	JRST	(1)

SIXOUT:	MOVEI	13,0
	JUMPE	12,(11)
	ROTC	12,6
	ADDI	13,40
	OUTCHR	13
	JRST	SIXOUT

	END	EXAM